Leg pricer

ABSTRACT

An electronic trading system utilizes a Match Engine that receives orders, stores them internally, calculates tradable combinations and advertises the availability of real and implied orders in the form of market data. The tradable combinations may include spread orders where one leg of the spread has a different tick size than the other or where the tick of the spread contract is different from the tick size in one or both legs. A method and system for calculating on-tick leg prices in an equitable and predictable manner is provided.

RELATED APPLICATIONS

This application is related to U.S. patent application Ser. No.10/700,406, filed Nov. 4, 2003, which is incorporated herein byreference in its entirety.

This application is related to U.S. patent application Ser. No.11/368,966, filed Mar. 6, 2006, which is a division of U.S. patentapplication Ser. No. 09/971,172, filed on Oct. 4, 2001, all of which areincorporated herein by reference in its entirety.

This application is related to U.S. patent application Ser. No.12/032,379, filed Feb. 15, 2008, which is incorporated herein byreference in its entirety.

This application is related to U.S. patent application Ser. No.12/350,788, filed Jan. 8, 2009, which is incorporated herein byreference in its entirety.

This application is related to U.S. patent application Ser. No.12/553,351, filed Sep. 3, 2009 which is incorporated herein by referencein its entirety.

This application is related to U.S. patent application Ser. No.12/560,026, filed on Sep. 15, 2009 which is incorporated herein byreference in its entirety.

This application is related to U.S. patent application Ser. No.12/560,145, filed on Sep. 15, 2009 which is incorporated herein byreference in its entirety.

This application is related to U.S. patent application Ser. No.12/560,122, filed Sep. 15, 2009, which is incorporated herein byreference in its entirety.

TECHNICAL FIELD

The following disclosure relates to software, systems and methods forelectronic trading in a commodities exchange, derivatives exchange orsimilar business involving tradable items where orders from buyers arematched with orders from sellers.

BACKGROUND

Electronic trading systems allow entry of a bid or offer for aparticular tradable item, which in futures trading is referred to as acontract. The simplest possible futures contract is the outrightcontract defined by a product and a delivery period. It is also possibleto define contracts that are combinations of simpler contracts. Forexample, the spread contract is defined as the simultaneous purchase andsale of two tradable items, such as futures contracts for differentmonths, different commodities, or different grades of the samecommodity. The bid and offer components of a spread are termed the bidleg and the offer leg respectively.

Electronic trading systems accept bids and offers in the form of orders,also referred to as real orders because they consist of data entered bytraders either directly or by computing devices under their control.Real orders may be entered for any tradable item in the system. Impliedorders, unlike real orders, are generated by the system on the behalf oftraders who have entered real orders, generally with the purpose ofincreasing overall market liquidity. For example, an implied spread maybe derived from two real outrights. Trading systems create the “derived”or “implied” order and display the market that results from the creationof the implied order as a market that may be traded against. If a traderenters an order to trade against this implied market, then the newlyentered order and the real orders that were used to derive the impliedmarket are executed as matched trades.

Implied orders frequently have better prices than the corresponding realorders in the same contract. This can occur when two or more tradersincrementally improve their order prices in hope of attracting a trade,since combining the small improvements from two or more real orders canresult in a big improvement in their combination. In general,advertising implied orders at better prices will encourage traders toenter the opposing orders to trade with them.

An electronic trading system operated by an exchange or similar businessentity must provide tradable items whose definitions and properties areacceptable to traders, regulators and other relevant stakeholders. Oneof these properties is the minimum price increment for the contractbeing traded, also referred to as the contract “tick”. For example, thecrude oil contract traded on the New York Mercantile Exchange isspecified by the exchange to trade in increments of $0.01 per barrel andhas a one-cent tick.

When a real order to buy an outright contract trades with a real orderto sell an outright contract, the trading system reports the price ofthe trade at the price agreed to by the traders, which will normally bea multiple of the minimum price increment for the contract being traded,which may be referred to as an on-tick price.

When a real order to buy a combination contract trades with a real orderto sell the same contract, the trading system records a trade for everyleg of the combination. For example, a trade in the January-Februarycrude oil spread is recorded as a trade in the January outright and atrade in the February outright. This makes it possible for the exchangeto record the positions held by traders in each contract and the amountsthey paid or received. The payment data is needed by the exchange tooperate as a business, for example in setting margin requirements fortraders.

Combination contracts include a minimum price fluctuation (i.e., ticksize) as part of the contract specification. The minimum pricefluctuation is not required to be the same as the tick size of one ormore of the contract legs. However, in some embodiments, the minimumprice fluctuation may be the same as the tick size of one or more of thecontract legs. In the event that the minimum price fluctuation is thesame as the tick size of one or more of the contract legs, the price ofa trade in the combination may be converted into leg prices. One leg maybe set to an anchor price according to a rule established by theexchange, for example, using the price of the last trade in the mostrecently traded leg. The other leg prices may be calculated using theanchor price plus or minus the prices of the components of thecombination. Accordingly, the leg prices are automatically on-tick.

When the combination contract does not have the same tick as one or moreof the legs, which can happen when the combination is a spread betweenproducts sold in different units such as gallons and barrels, thensimple addition and subtraction does not automatically result in legprices that are on-tick. In this case, the leg prices may be rounded toon-tick values so that they can be reported to the exchange.Accordingly, the spread contract may be referred to as a roundablespread.

Leg prices may be rounded to on-tick values for simple trades ofroundable spreads against other roundable spreads or roundable spreadsagainst a pair of outrights (i.e., a simple form of implied trade). Onlyone price rounding is typically required in these trades. The possiblegains and losses from rounding are understood by the participatingtraders and generally accepted. However, a trading system with morecomplex implied markets may have tradable order combinations with anynumber of roundable spreads, for which a much wider distribution ofgains and losses is theoretically possible.

Prior art trading systems do not have a systematic and predictablemethod of calculating on-tick leg prices for longer and more compleximplieds. This has limited the use of implied orders in these systems.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary electronic trading system;

FIG. 2A illustrates an exemplary match engine architecture where thematch engine is connected to other components of the trading networkenvironment by a message bus;

FIG. 2B illustrates an exemplary match engine core;

FIG. 3 illustrates one embodiment of a trade;

FIG. 4 illustrates one embodiment of an order for an outright contractas an order for a spread contract;

FIG. 5A and FIG. 5B illustrates one embodiment of a buy-sell tradablecombination;

FIG. 6 illustrates one embodiment of a tradable combination includingtwo outrights and a spread expressed in the same circuit representationas used in FIG. 5B;

FIG. 7 illustrates one embodiment of a tradable combination includingtwo outrights, a calendar spread and an inter-commodity spread;

FIG. 8 illustrates one embodiment of a method for providing leg pricesfor a tradable combination;

FIG. 9 illustrates one embodiment of a method for performinginitialization;

FIG. 10 illustrates one embodiment of a tradable combination showing thetick sizes in the order contracts and in the leg contracts;

FIG. 11 illustrates one embodiment of a tradable chain;

FIG. 12A and FIG. 12B illustrate another embodiment of a tradablecombination;

FIG. 13 illustrates another embodiment of a tradable combination;

FIG. 14 illustrates one embodiment of various scenario variances;

FIG. 15 illustrates one embodiment of various scenario variances and thedependence on the anchor price at the beginning of the correspondingtradable chain;

FIG. 16 illustrates one embodiment of grouping calculations; and

FIG. 17 illustrates one embodiment of reducing the number ofcalculations in order to obtain a faster but less exact result.

DETAILED DESCRIPTION

The present embodiments relate to leg pricing. As used herein, “legpricing” includes price rounding, for example, of one or more contractsor legs, to an on-tick price. As discussed below, a tick is a minimumprice fluctuation for a tradable product. An on-tick price is a pricethat ends with, e.g., falls on, a tick. An off-tick price is a pricethat does not end with, e.g., does not fall on, the tick. For example,if a tick is defined as $1.00 and the price of the contract is $3.75,then the price of the contract is off-tick. The price of the contractmay be rounded to $4.00, so that the price is on-tick. This illustrationis for exemplary purposes only.

Price rounding may include optimal price rounding. As used herein, theterm “optimal price rounding” includes distributing the gains and lossesamong the orders in manner that is as fair as possible to each traderplacing the orders. For example, price rounding may include theminimization or maximization of an optimality metric whose value dependson the gains and losses of traders relative to the gains and losses theywould have experienced if unrounded prices had been used. The optimalitymetric is a systematic and predictable calculation whose general form isknown to the traders.

In one aspect, a leg pricer comprises an input, a processor, and anoutput. The input is operable to receive a tradable combination oforders among which there are two or more roundable spreads. Theprocessor is coupled with the input. The processor is operable tocalculate leg prices for the orders in the tradable combination suchthat the leg prices are multiples of a minimum price increment of theleg prices and that the gains and losses of the roundable spread ordersare optimally distributed. The output is coupled with the processor. Theprocessor is operable to provide the output with the calculated prices.

In a second aspect, a leg pricer includes an input, a processor, and anoutput. The input is operable to receive one or more roundable spreadorders, each roundable spread order having one or more roundable legswith roundable tick prices. The processor is operable to round theroundable tick prices of the roundable legs such that fractional gainsand losses are minimized by distributing the fractional gains andlosses. The output is operable to output the rounded tick prices asmarket data.

In a third aspect, a method of rounding tick prices is provided. Themethod includes identifying one or more roundable spread orders in animplied chain having a matching order; determining a optimal roundingscenario for rounding the leg prices of the roundable spread orders, theoptimal rounding scenario ensuring that the leg prices of the roundablespread orders are on-tick and that the fractional gains and losses totraders are minimized; and rounding the leg prices of the roundablespread orders using the optimal rounding scenario.

In a fourth aspect, an apparatus for pricing legs of tradable spreads isprovided. The apparatus includes a means for identifying one or moreroundable spread orders in an implied chain having a matching order; ameans for determining a optimal rounding scenario for rounding the legprices of the roundable spread orders, the optimal rounding scenarioensuring that the leg prices of the roundable spread orders are on-tickand that the fractional gains and losses to traders are minimized; ameans for rounding the prices of the roundable spread orders using theoptimal rounding scenario.

FIG. 1 illustrates an electronic trading network 100. In this example,the electronic trading network 100 includes a client 110, a pricereporting system 120, and an electronic trading system 130. The network100 may include additional, different, or fewer components. For example,in one embodiment, the electronic trading network 100 may include onlythe electronic trading network. The client 110 and price reportingsystem 120 may be external and/or independent of the network 100. Theclient 110 and the price reporting system 120 may communicate with theelectronic trading system 130 using a communications network 102 such asthe Internet, a telephone network, or other communication network.

The client 110 may be a personal computer, server, mobile device,programmed computing device, networked computing system, or otherelectronic devices that may be used to transmit orders to the electronictrading system 130. The client 110 may be a user operated device. Theclient 110 may include a central processor that controls the overalloperation of the computer and a system bus that connects the centralprocessor to one or more conventional components, such as an electronictrading system 130. The client 110 may include a variety of interfaceunits and drives for reading and writing data or files. Depending on thetype of computer device, a trader can interact with the electronictrading system 130 using an input, such as a keyboard, pointing device,microphone, pen device or other input device. The input may be used fordefining a trade.

The price reporting system 120 may be a storage device, personalcomputer, server, mobile device, programmed computing device, networkedcomputing system, or other electronic devices that may be used receivedata from the electronic trading system 130. The price reporting system120 may be used to report market data, for example, to the client 110.Alternatively, the price reporting system 120 may be used to adjust,control, or manage prices of other trades.

The electronic trading system 130 may be a personal computer, server,mobile device, programmed computing device, networked computing system,or other electronic devices that may be used to match trades. Theelectronic trading system 130 may include an order submission point 132,validator 134, match engine 136, storage device 138, ticker plant 140,market data server 142, and market data distribution server 144. Theelectronic trading system 130 may include additional, different, orfewer components. Additional components may include hardware and/orsoftware components.

The electronic trading system 130 may be used by regulated andunregulated exchanges. For example, the electronic trading system 130may be used in or conjunction with any trading or futures market in theUnited States or elsewhere in the world, for example, the Chicago Boardof Trade (CBOT), the Chicago Mercantile Exchange (CME), the Bolsa deMercadorias e Futoros in Brazil (BMF), the London InternationalFinancial Futures Exchange, the New York Mercantile Exchange (NYMEX),the Kansas City Board of Trade (KCBT), MATIF (in Paris, France), theLondon Metal Exchange (LME), the Tokyo International Financial FuturesExchange, the Tokyo Commodity Exchange for Industry (TOCOM), the MeffRenta Variable (in Spain), the Dubai Mercantile Exchange (DME), and theIntercontinental Exchange (ICE).

The order submission point 132 may receive an electronic order (i.e.,“New Order”) from the client 110 via the communication network 102. Theorder submission point 132 may include an interface, device forreceiving data, storage device, device for transmitting data, anycombination thereof, or other component for receiving an electronicorder from the client 110.

The order submission point 132 may communicate with the validator 134,for example, via a circuit, wire, or other communication network. Forexample, the order submission point 132 may transmit the New Order tothe validator 134. The validator 134 may be operable to check theproperties of the New Order against established criteria (i.e.,“Validated Order”) and communicate the Validated Order to the matchengine 136. Validating the New Order may include comparing the New Orderto previously entered orders. In the event that the New Order did notmatch any previously entered orders, the match engine 136 may receivethe Validated Order and communicate the Received Order to the storagedevice 138, which stores the Received Order in a database 138 a. Thestorage device 138 may be implemented as part (such as software orfirmware) of the match engine 136. Alternatively, the storage device 138may be a database, a memory or another storage element, such as computerreadable storage media, tangible memory device, or other memory.Additionally, the storage device 138 may be computer hardware includinga processor and a storage element. In FIG. 1, the storage of theReceived Order by the storage device 138 may constitute the New Orders“official” reception by the electronic trading system 130. Accordingly,the storage device 138 may communicate an Execution Report to the ordersubmission point 132, from which the Execution Report may becommunicated to the originator of the order, i.e., the client 110. TheExecution Report may confirm that the New Order was received and stored.

The routing of messages, such as a new order message, validated ordermessage, or received order message, between the components 132 to 144may be managed with commercially available hardware and software. It isunderstood that descriptions are given in the singular only to simplifythe exposition. It is further understood that the term “order” and “NewOrder” may also refer to any data communicated to the trading systemthat can affect the properties of a previously communicated order,including, but not limited to, modification of its price, modificationof its volume or its cancelation or replacement by a different order.

The match engine 136 may communicate the existence of a New Order orValidated Order and any implied orders that it created to the TickerPlant 140 (reporting device) which in turn, communicates the orders tothe market data server 142. Ticker Plant 140 (reporting device) may bedisposed (i.e., positioned) between the match engine 136 and the marketdata server 132 and may aggregate data from multiple sources andcommunicate with components outside the electronic trading system 130,such as the price reporting system 120. Ticker Plant 140 may beimplemented as an integrated component of the match engine 136.Alternatively, the ticker plant 140 may be computer software, firmware,or hardware, that is separate but in communication with the match engine136. The market data server 132 may communicate market data to theclient 110 in a variety of ways. For example, the market data may besent to the order submission point 132 for communication with the client110 over the same link as the New Order and/or Execution Report, or sentto a market data distribution server 144 that can communicate with zero,one, or more clients 110.

The operations of match engine 136 may be performed in more than onepart of trading system 130 or in related systems. For example, thecalculation of implied orders or tradable order combinations may be doneby traders at their trading stations in search of arbitrageopportunities between trading networks or match engines. It is alsopossible to perform these calculations outside the trading system 130for the evaluation of possible trading strategies, for instruction,regulation or in the solution of other problems where trading is used asa model.

FIG. 2A shows one embodiment of a match engine 136 having a layeredarchitecture and embodied on a computer including a processor and amemory. Match engine 136 communicates with other components using amessage bus 201. Incoming messages are translated by an adaptation layer202 into events that can be processed by a match engine core 203(hereinafter, the “core 203”). The output messages from the core 203 aretranslated by the adaptation layer 202 back into messages that can betransmitted to other parts of the trading system 130 using the messagebus 201.

FIG. 2B shows the core 203 and its internal components. Incoming eventsfrom new order messages, modify order messages or cancelation messagesare interpreted by the matcher 204. If the event has the potential toaffect an implied market then it is passed to the implicator 205. Realand implied market data are filtered and combined by the market dataaggregator 206 and passed to the adaptation layer 202 for translationinto a message. The matcher 204 and the implicator 205 work together tocalculate implied orders and the tradable combinations that can occurwhen a newly arriving order is matched with one or more resting orders.The orders involved in the tradable combinations, if any, are found andpassed to the leg pricer 207. The matcher 204 decrements the workingvolumes of the orders that have been executed. The leg pricer 207computes the prices that will be reported to the adaptation layer 202for subsequent translation into external prices and data formats. In animplementation, the leg pricer 207 may compare the calculated priceswith criteria previously received by the match engine 136, said criteriaincluding but not limited to upper and lower price limits. The resultsof the comparison may be communicated to the matcher 204. The adaptationlayer 202 sends the appropriate message or messages to other tradingsystem components over message bus 201. Although this example includesthe leg pricer 207 as part of match engine 136 in an electronic tradingsystem 130, the leg pricer 207 may be used in any system where legprices must be calculated, such as an accounting system used tocalculate the value of trader positions or cash accounts.

Order matching may be performed by the match engine 136, of which theremay be multiple instances. Order matching may include matching orders.For example, the match engine 136 may match a real order with anotherreal order. In another example, the match engine 136 may match one ormore real orders with an implied order. The match engine 136 may be amatching component that receives orders, stores them internally,calculates tradable combinations and advertises the availability of realand implied orders in the form of market data. Traders, in turn, utilizethe trading system 130 to respond to the market data by sendingadditional orders. These additional orders are received by the matchengine 136, which then attempts to match them with previously receivedorders or combinations thereof. The match engine 136 may execute thepossible trades and communicate the results.

The embodiments are illustrated and described in terms of a distributedcomputing system. The particular examples identify a specific set ofcomponents useful in a futures and options exchange. However, many ofthe components and inventive features are readily adapted to otherelectronic trading environments. The specific examples described hereinmay teach specific protocols and/or interfaces, although it should beunderstood that the principles involved are readily extended to otherprotocols and interfaces in a predictable fashion.

In one embodiment, the leg pricer 207 is included in the match engine136. However, in other embodiments, the leg pricer 207 may perform theleg pricing function in other locations and that the principles involvedare readily extended to such systems.

The core 203 and its components may be implemented in a programminglanguage such as Java or C++ that allows multiple threads of executionand that a program with multiple threads may be executed on a computingsystem with multiple central processing units (CPU). In such animplementation, if the program is correctly designed, the threads willexecute in parallel and the time taken to execute all of the threads canbe as short as the time taken by the single longest thread. If there aremore threads than CPUs, then the execution time will depend on how manythreads must be executed sequentially on each CPU. In FIG. 2A and FIG.2B, it is contemplated that the core 203 will be implemented in such alanguage and that the calculation of implied orders by the implicator205 will be accelerated by performing many independent calculations inparallel on separate threads. It is also contemplated that the legpricer 207 may execute in parallel with the matcher 204 and implicator205.

The tradable combinations received by the leg pricer 207 may includeorders for both outright contracts and combination contracts. Suchcontracts may involve a wide range of physical products, including butnot limited to crude oil, heating oil, unleaded gasoline, reformulatedblendstock for oxygen blending (RBOB) gasoline, natural gas, gold,silver, copper, coffee, sugar, cocoa, cotton, orange juice and othercommodities. It is well-known that physical products have differentunits of measurement such as barrels, gallons, ounces or pounds and thatphysical products also have different practices for measurement anddelivery, all of which may lead to differences in how such products arepriced and traded. It is understood that financial products and othertradable items including but not limited to stocks, options, indexes oremission credits also have properties that affect how they may be pricedand traded. As previously mentioned, the leg pricer will be described interms of contracts and commodity trading on the understanding that itsoperation may be readily extended to any tradable item.

An example of a technique for defining contracts and calculating thecombinations of orders that can trade in such contracts can be found inU.S. patent application Ser. No. 12/032,379, which is incorporatedherein by reference in its entirety. In general, a contract may beeither implicable or non-implicable, where implicable relates to anorder for that contract that can trade in combinations with orders forother contracts and non-implicable relates to only buy and sell ordersin the contract can trade with each other. An implicable contract may beeither an outright contract or a combination contract defined as thepurchase and sale of specified quantities of any number of outrightcontracts. The 1:1 spread contract, hereinafter the spread, is aspecific type of combination contract defined as the simultaneouspurchase of a first outright contract and sale of a second outrightcontract, where the outright contracts may be futures contracts fordifferent months, different commodities, or different grades of the samecommodity. The purchase and sale components of a spread are termed thebid or buy leg and the offer or sell leg, respectively. In order tocalculate tradable combinations, outrights may be expressed as spreadsand combination contracts defined in terms of outrights may also beexpressed as spreads, collections of spreads, or collections ofcollections of spreads. As a result, price calculations defined fortradable combinations of spreads can be readily extended to tradablecombinations of other contracts. It is understood that a leg pricer 207that can calculate prices for tradable combinations of outright andspread orders in implicable contracts will also be operable for thesimple buy-sell combinations found in non-implicable contracts.

FIG. 3 illustrates a spread trade between two hypothetical traders. TheRB:CL spread is defined as the purchase of one lot of reformulatedblendstock for oxygen blending (RBOB) gasoline (symbol RB) and the saleof one lot of West Texas Intermediate Crude Oil (symbol CL). Buying thespread may include buying the distillate and selling the crude.Accordingly, the RB:CL spread may be positively priced. The RB:CL spreadis shown for the calendar month of January (letter code F) with the yearleft unspecified in order to lighten the illustration. Trader A hasentered an order 301 to buy the RBF:CLF spread for $10.00. Trader B hasentered an order 302 to sell the RBF:CLF spread for $10.00. Theconvention implemented in the adaptation layer 202 of match engine 136is that buy orders have their prices inverted, so that the tradabilityof a combination of orders can be determined by adding the prices of theorders and comparing the sum to zero. A tradable combination has a pricesum of zero or less (i.e., zero or a negative number). The invertedprice 303 is shown as a decoration on the order 301.

In order to distinguish between ordinary external prices and theinverted buy prices used by the core 203, the terms “external price” and“machine price” may be used. The suffixes “e” (i.e., for externalprices) and “m” (i.e., for machine price) may be used in numericalexamples. For example, a buy order for unleaded gasoline may have aprice of $2.0000/gallon and be shown as “2e.” If the price were scaledto $84.0000/barrel (1 barrel=42 gallons) for use in calculating theprice of a tradable combination, this might be shown as “84e”. If a buyand sell order at this price were shown in a tradable combination, theprices might appear as “−84m” and “84m”. One benefit of this conventionis that “lower is better” in the sense that −85m is a better bid than−84m, i.e. the bidder is proposing a better price to the seller when heor she raises the bid from 84e to 85e.

In one embodiment, the trade between Trader A and Trader B is recordedby the trading system not just as a trade between the spread orders butalso as a trade in each of the legs. The working volumes of the spreadorders are reduced by the amount traded and the traders are informedthat the orders have been executed. The trades in the legs are used toaccount for the changes in the traders' cash balances and positions heldin each contract. The prices in the legs may have been determined to be$60.00 for RBF and $50.00 for CLF. Accordingly, Trader A pays Trader B$60,000.00 for an RBF contract and Trader B pays Trader A $50,000.00 fora CLF contract. For a simple buy-sell combination this nets out to$10,000.00 between Traders A and B's cash accounts but for more complextradable combinations there can be multiple payments and receipts,sometimes with the same trader having more than one order present. Notethat inverting the buy prices makes it possible to calculate the changein a trader's cash position from the product of the order price andorder quantity. When the orders in a tradable combination are executedtogether in the same transaction, the sum of the changes in cashpositions is zero and the sum of changes in position is also zero.

FIG. 4 shows a representation of an order for an outright contract as anorder for a spread contract. A buy outright 401 is shown trading with asell outright 402. The spread contract may be defined as “buying theoutright and selling nothing,” where “nothing” may include a virtualoutright used to generalize and simplify the rules for bookkeeping. Thefirst of these bookkeeping rules is that “nothing costs nothing,” so theleg price at the “nothing” end of the spread is always zero. The secondbookkeeping rule is that the raw leg price at the sell end of a spreadorder, prior to any rounding, may be calculated by adding the leg priceat the buy end and the price of the order. Fixing the price of thevirtual outright at zero and using inverted buy prices allows the legprice of $60 at the RBF end to be calculated either by adding $60.00 to$0.00 (across the buy nothing, sell RBF order) or by subtracting $−60.00from $0.00 (across the buy RBF, sell nothing order). The leg tradeswhere nothing is bought or sold and nothing is paid or received are notincluded in the messages published by the match engine 136 or retainedbeyond their usefulness as an aid to calculation.

FIG. 5A and FIG. 5B show a representation of a buy-sell tradablecombination. In FIG. 5A, the buy RBF:CLF spread order 501 from Trader Ais resting in the core 203 and the sell RBF:CLF order 502 from Trader Bis arriving as a new order. The circled numbers 1 and 2 indicate thesequence numbers or arrival times of the orders, indicating that theorder 501 arrived in the core 203 before order 502. The decoration “V=1”on both orders indicates that both are for one lot. In FIG. 5B, thematcher 204 has formed a tradable combination that can be passed to theleg pricer 207. The orders are connected “head-to-tail” to form acircuit or cycle 503 such that the buy end of the arriving order isattached to the sell end of the resting order at the CLF leg 504 and thesell end of the arriving order is attached to the buy end of the restingorder at the RBF leg 505. The sum of the prices in the orders around thecircuit is zero. The prices for the leg trades have been leftundetermined.

FIG. 6 shows a tradable combination including two outrights and a spreadexpressed in the same circuit representation as used in FIG. 5B. FIG. 6illustrates the “nothing” outright relative to CLF and RBF. The legprice of the “nothing” outright is zero. Accordingly, as discussedabove, using inverted buy prices allows the leg price at the RBF end tobe calculated by adding the selling price for RBF across the buynothing, sell RBF order. The leg price at the CLF end is similarlycalculated by either adding the price of the RBF:CLF order (as roundedfor trading) to the leg price of RBF, or by subtracting the (inverted)price of the Buy CLF order. The leg trades where nothing is bought orsold and nothing is paid or received are not included in the messagespublished by the match engine 136 or retained beyond their usefulness asan aid to calculation.

FIG. 7 shows a tradable combination including an RBF:RBG calendar spread(January to February), an RBG outright, a CLF outright and an RBF:CLFinter-commodity spread. The prices in FIG. 7 are given in dollars perfull contract. Accordingly, the prices are expressed in the same unit sothat they can be added and subtracted to determine leg prices. Forexample, the leg price for the CLF leg would be $70,000.00 for the fullcontract or $70.00/barrel applied to full contract of 1000 barrels.

The orders in a tradable combination may be categorized according totheir contracts. In one embodiment, these contract-related categoriesare represented by the letter symbols shown in Table 1. For example, theletter symbol “O” may represent an outright, “C” may represent anon-roundable spread (e.g. a calendar spread) and “X” may represent aroundable spread (e.g. a crack spread such as RB:CL). The letter “I”indicate an implication or trading pattern and is used to locate thetrigger order. For example, in FIG. 7, the contract categories of theorders in the tradable combination are shown as “C”, a first “O” and asecond “O” for the resting orders and an “X” for the incoming SellRBF:CLF that trades with the Buy RBF:CLF implied by the resting orders.This relationship is expressed by the string “COOIX” which may be readas “a calendar spread and two outrights imply (and subsequently tradewith) a crack spread”. Strings formed from the symbols of Table 1 thatcorrespond to tradable combinations are referred to as implicationpatterns (hereinafter “patterns”).

TABLE 1 Combination Categories of Orders in Contracts Symb NicknamContract Type O outright Outright contract, e.g. January 2010 crude oilCLF0 C calendar Any spread contract where the legs are in or the sameunit and have the same tick size “spread” as the spread itself. TheNYMEX crude oil calendar spread, e.g. CLF0:CLG0 is an example of thistype, but so are intra- commodity spreads where the units and ticks arethe same, such as RB:HO, the spread between gasoline and heating oil. Xcrack or Any spread contract where the tick size in “roundable thecontract is different than the tick size in spread” one of the legs. Thecrack spread, e.g. RBF0:CLF0 is an example of this type, but so is theNYMEX silver (SI) spread whose tick size is smaller than the tick sizeof the silver outright. I or i “implies” Not a contract itself, butappears in or “trades expressions along with the contract type to with”indicate an implication or trading pattern, e.g. “OOIC” to represent twooutrights implying or trading with a calendar spread. In the lattercase, the order in the final position is the trigger order.

Every contract in the trading system has a tick size. As used herein, a“tick” is a minimum price fluctuation for a tradable product and thetick size, i.e., the size of the fluctuation, is defined by the exchangethat offers the contract as a tradable item. Different tradable productshave different sized ticks. For example, the common tick size for crudeoil is 1 cent ($0.01) per barrel and the common tick size for gasolineis 1/100 of a cent ($0.0001) per gallon. It is understood that everycomputer implemented trading system must impose some finite limit on theprecision of the prices used in trading and that even contracts withvery small tick sizes require leg pricing.

In addition to the tick size there is a price per tick determined by thesize of the contract being traded. For example, the common contract sizefor crude oil and its distillates is 1000 barrels or its equivalent42000 gallons. A contract for 1000 barrels that varies in priceincrements of $0.01 per barrel will vary in total value increments of$10.00. This is referred to as the price per tick and reflects the gainor loss to a trader who buys a contract and sells it at the closestpossible price. It is understood that an exchange may define the ticksizes for its contracts so that traders buying at a given price andselling at a price one tick higher will receive a gross profit fromwhich their costs can be reasonably met, notable among which are thetransaction fees charged by the exchange.

Table 2 illustrates various tick sizes and prices per tick for variousoutright contracts defined by the NYMEX. Table 3 illustrates varioustick sizes and prices per tick for various intra-commodity spreadsdefined by the NYMEX, including but not limited to calendar spreadswithin some of the commodities of Table 2. Table 4 illustrates varioustick sizes and prices per tick for various inter-commodity spreadsdefined by NYMEX between some of the commodities of Table 2. Othertradable products, tick sizes, and prices per tick may be defined by thesame or different exchanges. For example, another exchange may have adifferent tick size for CL. It should be noted that the RB (reformulatedblendstock for oxygen blending gasoline) contract has since replaced theHU (NY Harbor unleaded gasoline) contract as the benchmark for gasolineand that HU is no longer traded at NYMEX. However, the procedure for legpricing is identical for both contracts and both are used in the figuresherein.

TABLE 2 Tick Size and Price for Outright Contracts Outright ContractTick Size Price per Tick ($) CL 0.01 10.00 SC 0.01 10.00 HO 0.0001 4.20HU 0.0001 4.20 RB 0.0001 4.20 GR 0.25 25.00 NG 0.001 10.00 PN 0.00014.20 PL 0.10 5.00 PA 0.05 5.00 QL 0.01 15.50 GC 0.10 10.00 SI 0.00525.00 HG 0.0005 12.50 AL 0.0005 22.00 JM 0.05 42.00 RS 0.25 25.00 RN25.00 250.00

TABLE 3 Tick Size and Price for Calendar Spread ContractsIntra-Commodity Minimum Tick Price per Tick ($) CL 0.01 10.00 HO 0.00014.20 HU 0.0001 4.20 RB 0.0001 4.20 NG 0.001 10.00 PN 0.0001 4.20 PL 0.105.00 PA 0.05 5.00 QL 0.01 15.50 GC 0.10 10.00 SI 0.001 5.00 HG 0.000512.50 AL 0.0005 22.00 JM 0.05 42.00

TABLE 4 Tick Size and Price for Inter-Commodity Spread ContractsInter-Commodity Minimum Tick Price per Tick ($) HO: CL 0.01 10.00 HU: CL0.01 10.00 HU: HO 0.0001 4.20 RB: CL 0.01 10.00 RB: HO 0.0001 4.20

The tradable combinations received by the leg pricer 207 may be groupedinto pattern categories, which are summarized in Table 5. The patterncategories may clarify the description of the leg pricing calculations.A variety of categorizations are possible and that a computerimplementation of the leg pricer 207 may arrive at the requiredcalculations through other means. In particular, pattern category sixmay include all combinations not assigned to other categories and in oneembodiment may be the only category present since pattern category sixis applicable to all tradable combinations.

TABLE 5 Pattern Categories of Tradable Combinations Pattern PatternCategory Examples Description 1 OIO Real outright with real outright. 2CIC, CCIC, Real spread with real spread or any number CCCIC, etc. ofreal spreads where the ticks on all spreads and in all the legs of allthe spreads are the same. 3 OOIC, Two outrights and any number ofspreads OOCIC, with the same unit and tick size both in the OOCCIC,spreads and in their legs. The leg pricing for etc. COIO and OCIOfollows the same procedure as the leg pricing for OOIC, as do the cyclicpermutations of all other patterns. 4 XIX Real roundable spread with areal roundable spread. This is a special case that allows no- loss legpricing in certain cases. 5 OOIX, Any combination with outrights and asingle OOCIX, roundable spread. Any number of calendar OOCCIX, etc.spreads or other non-roundable spreads may be present. 6 OOXIX, Anycombination. All of the preceding OOCXIX, categories 1-5 are specialcases that may, but OOCXCXIX, do not have to be, processed separately byCXCIX, the Leg Pricer. CXXCXIC, etc.

An exemplary roundable spread contract is a spread between products withdifferent tick sizes, where the spread can be priced in only one of theticks. Exemplary products are NYMEX heating oil (HO) and light, sweetcrude oil (CL). Heating oil (HO) is priced in gallons with a tick sizeof $4.20 per contract. Light, sweet crude oil (CL) is priced in barrelswith a tick size of $10 per contract. The HO:CL spread is priced inbarrels with a tick size of $10 per contract.

Alternatively, a roundable spread contracts may be a spread within acommodity where the spread tick is smaller than the underlying outrighttick. One example of a spread within a commodity, where the spread tickis smaller than the underlying outright tick, is a silver (SI) outrighthaving a tick size of $25/contract but the SI:SI calendar spread havinga tick size of $5/contract. The tick size for the SI:SI calendar spreadis smaller than the tick size for the silver outright.

In yet another alternative embodiment, a roundable spread contract maybe a spread having a tick size that is different from the tick sizes oftwo or more tick sizes in the underlying outright, where the tick sizesof the underlying contract are different from each other.

The trading system 130 may include match engines 136. Each match engine136 may perform matches for a orders in a group of contracts. Contractsmay be assigned to groups for a variety of reasons, including but notlimited to increasing the speed of order execution through parallelprocessing, reducing the risk of failure through redundant processing orimplementing business agreements where one exchange provides tradingservices for another. Contracts may be grouped so that the outrightcontracts in a single product and the calendar spreads between them areassigned to an independent match engine 136. For example, in oneembodiment, the NYMEX natural gas (NG) outrights and calendar spreadstrade on an independent match engine 136 within the trading system 130and the leg pricer 207 inside core 203 receives only tradablecombinations whose orders all have the same tick size and for which legprices may be readily calculated. When the scope of implication in agroup of contracts traded in a match engine 136 is limited to simplepatterns that contain at most one roundable spread, then simple roundingor averaging techniques will be adequate to calculate acceptable legprices. A leg pricer 207 may calculate leg prices in an equitable andpredictable manner for trading combinations of arbitrary complexity mustbe operable to process the simplest combinations as well as the mostcomplex. Those of skill in the art will appreciate the advantage ofhaving a single computer program for leg pricing that can be used inevery match engine 136 within trading system 130.

The leg pricer 207 may receive a tradable combination that belongs toany category. One of the orders in the combination may be a triggerorder which is either market order or a limit order whose limit price isbetter than the price needed to trade with the one or more other ordersin the combination. If so, the price of the trigger order for thepurpose of calculating trade prices and leg prices set to a price thatis just capable of trading. For example, a buy order with limit price of$70.05 may be entered with the intent of trading with a resting sellorder at $70.03. For the purpose of calculating leg prices, the buyorder is treated as if the price were $70.03. In the case of impliedorders that contain roundable spreads, it is understood that the priceof the implied order published in the market data will be such that anyinput order entered at an equal or better price will be capable offorming a tradable combination with the orders in the implied. Forexample, if an implied sell order was calculated to have a price of$70.0126 and the tick size in the relevant contract was $0.01, thepublished price would be rounded “away from the market” to the on-tickselling price of $70.02. In other words, sell prices are rounded up tothe next tick and buy prices are rounded down before publishing. A buyorder entered at a price of $70.02 is capable of trading with an impliedorder to sell at $70.0126, whereas a buy order entered at thenext-lowest on-tick price of $70.01 would not be capable of trading withan implied order to sell at $70.0126. It is understood that theprocedure of assigning a trade price based on the prices of the restingorders represents a common business practice and not a limitation of theleg pricer 207. For example, a group of elected stop orders with equaltime priority could have trade prices set according to a weightedaverage or other rule, so long as the trade price for every order in thetradable combination may be determined.

The leg pricer 207 may receive a tradable combination that belongs toany pattern category, as shown in Table 5. The prices of outright tradesand the prices of leg trades in the spread contracts may be calculated.The prices of these leg trades may be recorded, along with a timestampor sequence number such that the question “which is the most recent legtrade and what was its price” may always be given a unique answer. Theleg pricer 207 may be initialized with data for all possible outrighttrades, so that the question may be given a unique answer before anyactual trades have been recorded. For example, the initial prices can betaken from the previous session's settlement prices and the initialtimes from the times that the contracts were created in the tradingsystem. The recording of the trades in the outright contracts and in thelegs of spreads in a tradable combination may be conditional on theproperty of price discovery, which the exchange may assign to categoriesof tradable combinations. In an implementation, the presence of outrightcontracts in a tradable combination causes that combination to have theproperty of price discovery. Those of skill in the art will appreciatethat other assignments and initializations are possible and that the legpricer 207 may be readily extended to accommodate these.

a. Leg Pricing: Category One

The leg pricer 207 may receive a tradable combination belonging topattern category one, wherein an outright trades with an outright. Thetrade price is the price of the order that was entered first andtherefore has the highest time priority. The only leg to price is thetrade. No rounding decision is required. FIG. 4 is an example of acategory one trade. In an implementation, combinations belonging tocategory one are considered to have price discovery. The leg pricer 207records the time of the trade and the trade price, since these may beused to determine the anchor leg and the anchor price when calculatingleg prices for combinations that belong to other categories. The legpricer 207 may determine the price of each leg and report the prices tothe ticker plant 140.

b. Leg Pricing: Category Two

The leg pricer 207 may receive a tradable combination belonging topattern category two, where any number of real spreads may be present solong as the tick sizes on the all spreads and all of the legs of thespreads are the same. The leg pricer 207 determines which leg has themost recent trade and what the price of that trade was. This leg isdesignated as the anchor leg and the most recent trade price in that legis designated as the anchor price. The prices of the other legs aredetermined by adding or subtracting the prices of the orders that areconnected in the tradable combination according to the proceduresalready described. In an implementation, combinations belonging tocategory two are not considered to have price discovery. The leg pricer207 does not record the times of the leg trades or the prices. FIG. 3 isan example of a category two trade. If the most recent leg trade hadbeen the $60m trade in RBF, then this would be the anchor price and theother leg price of $50m determined by adding the $−10m order priceacross the order leading from the anchor. The leg pricer 207 maydetermine the price of each leg and report the prices to the tickerplant 140.

c. Leg Pricing: Category Three

Leg pricer 207 may receive a tradable combination belonging to patterncategory three, wherein two outrights and any number of real spreads maybe present so long as the tick sizes on the all spreads and all of thelegs of the spreads are the same. The anchor leg is set to the virtualoutright at the junction point between the two outright contracts andthe anchor price is set to zero. The prices of the other legs aredetermined by adding or subtracting the prices of the orders that areconnected in the tradable combination according to the proceduresalready described. In one embodiment, combinations belonging to categorythree are considered to have price discovery. Leg pricer 207 records thetimes and prices of the leg trades as previously described. Leg pricer207 may determine the price of each leg and report the prices to theticker plant 140.

d. Leg Pricing: Category Four

Leg pricer 207 may receive a tradable combination belonging to patterncategory four, where a real roundable spread order trades with anopposing real roundable spread order in the same roundable spreadcontract. The leg pricer 207 is operable to perform zero-loss legpricing and round-to-nearest-tick leg pricing. In one embodiment, thechoice of method is established by the exchange and communicated to thematch engine 136, for example as a contract property read from database138 a when the match engine starts up. In one embodiment, combinationsbelonging to pattern category four are not considered to have pricediscovery. Leg pricer 207 may not record the times of the leg trades orthe prices.

Leg pricer 207 may perform zero-loss leg pricing for spreads where thespread tick is the same as one of its leg ticks and the two leg tickshave reasonably small common multiple, with the criterion of reasonablysmall is a numerical value set by the exchange. For example, the HO:CLspread contract and the HU:CL spread contract traded on the New YorkMercantile Exchange are priced in barrels with a tick size of $0.01 anda price per tick of $10.00 on the 1000 barrel contact. The HU or HO legsare priced in gallons with a tick size of $0.0001. There are 42 gallonsto the barrel and the contract size is 42000 gallons in order to make itcomparable in size to the crude oil contract. The price per tick is$4.20. The CL leg is priced in barrels with a tick of $0.01, same as thespread. The $10.00 increment and the $4.20 increment have a commonmultiple at $210.00. Expressed in terms of contract prices, every CLcontract priced at a multiple of $0.21 has its counterpart of an HO orHU contract priced at a multiple of $0.0050. For the NYMEX tradingcommunity this is a “reasonably small common multiple” and zero-loss legpricing can be applied to HU:CL and HO:CL.

In zero-loss leg pricing, the leg with the same tick as the spread isreferred to as the spread tick leg and the other leg is referred to asthe common multiple leg. The leg price in the common multiple leg is setto a multiple of the tick and the spread price is used to calculate theleg price in the spread tick leg. This puts the leg prices and thespread price on-tick.

An example of zero-loss leg pricing is shown in Table 6. The exampleshows the more complex situation where the anchor leg, determined by themost recent trade or similar criteria, is in the spread tick leg CL at aprice of $70.00. If the anchor price was in the common multiple leg, itcould be used immediately as the raw price. If not, as shown in theexample, a raw price for the common multiple leg (HO) is computed byadding or subtracting the trade price from the price of the anchor leg.In this case the price is added because HO is defined as the front legof the spread, i.e. “buy HO:CL means buy HO, sell CL” so that a positivetrade price for HO:CL corresponds to HO being higher in price than CL.The common multiple anchor price is then computed by rounding the rawprice to a common multiple of the two ticks, e.g. $210 per contract forHO:CL. The leg price in the spread tick leg is computed by adding orsubtracting the trade price as appropriate. The external prices indollars per gallon or dollars per barrel are calculated by applying theappropriate scale factors.

TABLE 6 Example of Zero-Loss Leg Pricing CL HO zero-loss common legprice Difference multiple internal between HO anchor (subtract CL HOzero-loss HO:CL CL raw price price internal zero- zero- CL leg HO:CLprice anchor for (HO spread loss leg loss leg price and trade scaledprice common zero loss price from price price original CL price byscaled multiple internal internal external external anchor $/bbl 1300 by1300 HO leg leg price) HO price) $/bbl $/gal $/bbl 14.00 14000 7000084000 84000 70000 70.00 2.0000 0.00 14.01 14010 70000 84010 84000 6999069.99 2.0000 −0.01 14.02 14020 70000 84020 84000 69980 69.98 2.0000−0.02 14.03 14030 70000 84030 84000 69970 69.97 2.0000 −0.03 14.04 1404070000 84040 84000 69960 69.96 2.0000 −0.04 14.05 14050 70000 84050 8400069950 69.95 2.0000 −0.05 14.06 14060 70000 84060 84000 69940 69.942.0000 −0.06 14.07 14070 70000 84070 84000 69930 69.93 2.0000 −0.0714.08 14080 70000 84080 84000 69920 69.92 2.0000 −0.08 14.09 14090 7000084090 84000 69910 69.91 2.0000 −0.09 14.10 14100 70000 84100 84000 6990069.90 2.0000 −0.10 14.11 14110 70000 84110 84210 70100 70.10 2.0050 0.1014.12 14120 70000 84120 84210 70090 70.09 2.0050 0.09 14.13 14130 7000084130 84210 70080 70.08 2.0050 0.08 14.14 14140 70000 84140 84210 7007070.07 2.0050 0.07 14.15 14150 70000 84150 84210 70060 70.06 2.0050 0.0614.16 14160 70000 84160 84210 70050 70.05 2.0050 0.05 14.17 14170 7000084170 84210 70040 70.04 2.0050 0.04 14.18 14180 70000 84180 84210 7003070.03 2.0050 0.03 14.19 14190 70000 84190 84210 70020 70.02 2.0050 0.0214.20 14200 70000 84200 84210 70010 70.01 2.0050 0.01 14.21 14210 7000084210 84210 70000 70.00 2.0050 0.00 14.22 14220 70000 84220 84210 6999069.99 2.0050 −0.01 14.23 14230 70000 84230 84210 69980 69.98 2.0050−0.02 14.24 14240 70000 84240 84210 69970 69.97 2.0050 −0.03 14.25 1425070000 84250 84210 69960 69.96 2.0050 −0.04 14.26 14260 70000 84260 8421069950 69.95 2.0050 −0.05 14.27 14270 70000 84270 84210 69940 69.942.0050 −0.06 14.28 14280 70000 84280 84210 69930 69.93 2.0050 −0.07

Those of skill in the art will appreciate that zero-loss leg pricing isnot appropriate for every roundable spread. For example, the $0.21/bblcommon multiple between CL and HU or HO is equivalent to $210/contract.Other possible spreads with contracts priced in other units may havelarger common multiples. It is understood that the decision on when touse zero-loss leg pricing and when to use round-to-nearest-tick legpricing depends on the business relationships between the exchange, thetraders and the traders' firms. A threshold value may be used to preventthe leg pricer 207 from calculating zero-loss prices for new spreadswhere a very large common multiple would force the leg prices to extremevalues that could affect the profit and loss accounting for traderswhose trades included both outrights and spreads. In an implementation,the threshold is stored as a defined constant in a computer program witha value appropriate for the trading system.

The leg pricer 207 may perform round-to-nearest tick pricing fortradable combinations belonging to pattern category four in cases wherethe criteria for zero-loss pricing have not been satisfied. The anchorleg is chosen based on the last trade. The raw price of the other leg iscalculated and rounded to the nearest tick in its contract. The gain andloss are always of equal magnitude in a two-order trade, so theintuitive rounding to the nearest tick will minimize the loss and thegain in the same operation.

An example is given in Table 7. As shown in Table 7, the resting ordermay be “Buy HO:CL at $14.00 barrel and the input order may be sell HO:CLat $14.00/barrel. Based on a previous trade, the leg pricer 207 maydetermine that the anchor leg is HO. The raw leg prices may be HO($2.0001/gallon) and CL ($70.0042/barrel). The leg pricer 207 may roundCL to $70.00. In this case, the seller of CL (the resting spread)receives $70,000.00 instead of $70,004.20, which corresponds to a lossof $4.20 to the seller and a gain of $4.20 to the buyer of CL (the inputspread). As a result, this is the nearest tick, and has the leastgain/loss. Alternatively, CL may be rounded to $70.01. In this case, theseller of CL (the resting spread) receives $70,010.00, instead of$70,004.20, which corresponds to a gain of $5.80 to the seller and lossof $5.80 to the buyer of CL (the input spread).

TABLE 7 Round-to-Nearest-Tick Pricing Resting Order: Buy HO: CL @$14.00/barrel Input Order: Sell HO: CL @ $14.00/barrel. Anchor: HO$2.0001/gallon from a previous trade Raw Leg Prices: HO: $2.0001/gallon(=84.0042/barrel). CL: $70.0042/barrel Possible CL: $70.00, the sellerof CL (the resting spread) roundings receives $70,000.00 instead of$70,004.20, a loss of $4.20 to the seller and gain of $4.20 to the buyerof CL (the input spread). This is the nearest tick, and has the leastgain/loss. CL: $70.01, the seller of CL (the resting spread) receives$70,010.00 instead of $70,004.20, a gain of $5.80 to the seller and lossof $5.80 to the buyer of CL (the input spread).

e. Leg Pricing: Category Five

The leg pricer 207 may receive a tradable combination belonging topattern category five, where there are two outrights and a singleroundable spread along with any number of calendar spreads or othernon-roundable spreads. In an implementation, combinations belonging tocategory five are considered to have price discovery. The leg pricer 207records the times and prices of the leg trades as previously described.The leg pricer 207 may determine the price of each leg and report theprices to the ticker plant 140.

The leg pricer 207 may receive a tradable combination belonging tocategory five with the further property that only two outrights and asingle roundable spread are present, as shown for example in FIG. 6. Aspreviously mentioned, such a combination may only be formed when theprice of the roundable spread is better than that implied by the twooutrights. For example, Buy CL @ $70.01/bbl, Sell RB @ $2.0030/gal andBuy RB:CL @ 14.12 are tradable, as shown in Table 8. The spread traderwas willing to pay out $14,120.00 to take the position in the spread butonly had to pay out $14,116.00.

TABLE 8 Category Five Pricing without Rounding Paid by Received Price inPrice in $ Trader by Trader Quoted for a Full on on Net Ord # OrderUnits Contract Execution Execution Change 1 Buy CL  $70.01/bbl 70,010.0070,010.00 — −70,010.00 2 Sell RB $2.0030/gal 84,126.00 — 84,126.0084,126.00 3 Buy RB:CL  $14.12/bbl 14,120.00 84,126.00 70,010.00−14,116.0

FIG. 7 illustrates how the addition of a non-roundable spread to thecombination does not alter the requirement that the price of theroundable spread be better than that implied by the other contracts orthe requirement that the leg prices be set without the possibility ofrounding. Since there is only a single roundable spread present, anynon-roundable spread or spreads added to the combination will be betweenthe outrights and the single roundable spread. Non-roundable spreads mayhave the same tick size as their legs. Non-roundable spreads keep thecalculated leg prices on-tick until the buy and sell ends of theroundable spread are reached, at which point the leg prices for theroundable spread are determined with no possibility of rounding.

f. Leg Pricing: Category Six

Leg pricer 207 may receive a tradable combination belonging to patterncategory six, where there may be zero or two outrights and any number ofroundable or non-roundable spreads. Leg pricer 207 may determine legprices for the tradable combination of pattern category six.

The leg pricer 207 may receive a tradable combination from the matcher204. In one embodiment, the tradable combination is received as a datastructure corresponding to the nodes and edges shown, for example, inFIG. 5B, FIG. 6 or FIG. 7. Those of skill in the art will appreciatethat programming languages such as Java or C++, in which the leg pricer207 may be implemented, have a wide variety of simple and compound datatypes and access methods suitable for the operations described herein.

Leg pricer 207 may identify an anchor leg. If the tradable combinationcontains outrights then the anchor leg is the virtual outright. If thetradable combination does not contain outrights then the anchor leg isthe leg in which the most recent trade with price discovery hasoccurred.

Leg pricer 207 may determine the anchor price at the anchor leg. If thetradable combination contains outrights then the anchor price at thevirtual outright anchor leg is zero. If the tradable combination doesnot contain outrights then the anchor price is determined by firstdetermining a raw anchor price and second determining an anchor pricebased on the raw anchor price, one or more properties of the tradablecombination received from the Matcher and one or more properties of thecontracts being bought or sold by the orders in the tradablecombination. The raw anchor price is the price of the most recent tradein the anchor leg. If the tradable combination consists of a buy orderand a sell order in a roundable spread contract that has been designatedas a contract for zero-loss leg pricing then the anchor price may beadjusted from the raw anchor price to a nearby price in such a way thatthe leg prices will be on-tick, using the procedure previously describedfor a category four combination. It is understood that the raw anchorprice may on occasion satisfy the criteria for zero-loss leg pricing andthe “nearby price” may be the raw anchor price itself. If the tradablecombination is not subject to zero-loss leg pricing then the anchorprice may be set to the raw anchor price. It is further understood thatcomparing leg prices to criteria including but not limited to upper andlower price limits may result in a failure that could in principle becorrected by an adjustment of the anchor price, for example, where theleg price in a combination consisting entirely of spreads has exceededan upper price limit by a small amount. Determining the anchor price mayinclude adjusting the anchor price following the computation of legprices.

Leg pricer 207 may convert the circuit form of the tradable combinationinto a chain with its origin at the anchor leg. The leg pricer 207 mayuse a computer programming language, such as Java or C++, which usesiterators, pointers, indexes, counters or similar forms of indirectreference rather than explicitly “splitting”, “rotating”, “copying” orotherwise operating directly on the data structure.

An exemplary tradable combination is shown in FIG. 10. The tradablecombination has the pattern XXCXXIC and belongs to category six. Theincoming trigger order 1010 to sell calendar spread HUG:HUF is showntrading with implied order 1020 to buy HUG:HUF, made up of the fiveresting orders to buy HUF:CLF, sell HOF:CLF, buy HOF:HOG, buy HOG:CLGand sell HUG:CLG. It is understood that “buy HO:CL” has the same meaningas “sell CL:HO” and similarly for HU. It is further understood thatwriting HO or HU as the front leg expresses the exchange conventionsthat to buy the front leg is to buy the spread and that to buy a crackspread is to buy the distillate. The price of the trigger order for thepurposes of leg pricing is determined by summing the prices on theresting orders where the buy prices have been inverted as previouslydescribed. In order to more clearly identify the roundable spreads, thetick sizes for the spread contracts and the outright leg contracts areshown where prices normally appear. The roundable spreads are markedwith asterisks and it can be seen that the tick sizes for these spreadsare different from at least one of the ticks in their associated legs.

In FIG. 11, an exemplary anchor leg has been chosen at the HOG leg 1110based on, for example, the most recent price-discovered outright tradehaving taken place in the contract. The circuit has been split apart atthe anchor leg and stretched out to form a chain. The anchor leg hasalso been added at the end of the chain as the “anchor redux” 1120 as aconvenient way of expressing the constraint that the price at the end ofthe chain must be identical to the price at the beginning. The symbolsp₁, p₂, p₃, p₄, p₅, p₆ and p₇ are used to represent the leg prices andthe symbols q₁, q₂, q₃, q₄, q₅ and q₆ are used to represent the pricesof the orders in the tradable combination. The trigger order 1010 inFIG. 10 appears as order 1130 in FIG. 11. The letters A, B, C, D, E andF adjacent to the spread orders indicate exemplary traders associatedwith these orders.

Leg pricer 207 may iterate the chain and determine the number ofrounding scenarios that must be considered. It will be recalled thattradable combinations in category one, two, three and five have only onerounding scenario. Category four has one rounding scenario whenzero-loss leg pricing is performed and two rounding scenarios (“roundup” and “round down”) otherwise. Leg pricer 207 begins with the anchorprice p₁ and computes successive leg prices by applying the formulap_(k+1)=floor (p_(k)+q_(k), tick_(k+1)), where the function floor (x,a)rounds x to the nearest multiple of a that is less than or equal to x.For example, floor (4.7, 0.25)=4.50 and floor (−3.1, 0.25)=−3.25. InFIG. 11, for example, p₂ is determined by adding p₁ and q₁ and roundingdown to a multiple of $10, the price per tick in CL, it being understoodthat the sum of p₁ and q₁ may itself be a multiple of $10 so that therounded price is just the sum itself. For every leg k+1, the spreadtrader gain Δ_(k) for the preceding spread from leg k to k+1 iscalculated according to the formula Δ_(k)=(p_(k+1)−p_(k))−q_(k). It isunderstood that Δ_(k) may take on positive or negative values and that anegative gain is equivalent to a loss.

In one embodiment, leg pricer 207 may calculate Δ_(k) to determinewhether a given leg should be included in one or more roundingscenarios. The leg pricer 207 advances from one leg to the next untilthe anchor redux leg is reached at the end of the chain. At each leg, itdetermines whether the leg is a roundable leg according to the followingthree criteria: First, if the preceding spread is a roundable spread;second, if the price of the roundable spread is such that rounding isrequired at its sell end; and third, the roundable spread is not thefinal spread before the anchor redux. If all three criteria are met thenthe leg is a roundable leg. It is understood that in iterating a longchain that a rounded price may fall fortuitously on-tick, for example ifthe first roundable spread order and a subsequent roundable spread orderare at prices where the movement “towards” and “away from” an on-tickprice cancel each other out. As a result, the second aforementionedcriterion is only applied until a roundable leg is found, after whichevery leg that follows a roundable spread prior to the last roundablespread is considered to be roundable. At the end of the iteration, thenumber of rounding scenarios N is calculated as N=2^(n), where n is thenumber of roundable legs. This formula (i.e., N=2^(n)) indicates thatthe price at a roundable leg may be rounded up or down, i.e. there aretwo choices at each leg.

It is understood that on occasion, the anchor price and the order pricesmay be such that a calculated leg price at a roundable leg will beon-tick, in which case rounding up and rounding down have the identicalresult. In one embodiment, the leg pricer 207 is used only on contractssuch as those shown in Table 6 where most prices are likely to requirerounding and there is little practical advantage in reducing the numberof scenarios to evaluate in special cases. In an alternative embodiment,the leg pricer is used on contracts such as the NYMEX silver contract(symbol SI) where the calendar spread has a tick size of $5.00 and theoutright has a tick size of $25.00, so that duplicate scenarios occurmore frequently. The extension of the scenario counting logic to reduceor eliminate the evaluation of duplicate scenarios in leg pricers thatare limited to such contracts is readily apparent. Those of skill in theart will appreciate that trading combinations in category one, categorytwo, category three, category four with a zero-loss anchor price andcategory five will have zero roundable legs and therefore only onerounding scenario.

An example of a category five tradable combination with zero-loss legpricing is shown in FIG. 12A for HO:CL and an example without zero-lossleg pricing is shown in FIG. 12B for HO:GR. In both HO:CL and HO:GR,there are two roundable spreads in the chain of which only the firstleads to a potentially roundable leg. The tick sizes for HO and CL arebased on the established pricing and contract sizes. The tick size 1210for GR is shown in the diagram at $5.00, based on a contract definitionfor GR where the lot size is 100 metric tons (tonnes) and the tick is$0.05. Since there are 7.45 barrels per metric ton, a hypothetical 1:1HO:GR spread trade would exchange 1000 barrels (42000 gallons) ofheating oil for 745 barrels (100 tonnes) of Gasoil Rotterdam. This typeof transaction changes a trader's effective position in petroleumdistillates and is like an outright trade in combination with a truespread trade between contracts of equivalent value. In such a situationthe traders might want the recorded leg trades to be as close to thefair market values as possible and zero-loss leg pricing would thereforenot be used. In FIG. 12B, the GRG leg is identified as a roundable legin scenario position one, where a decision must be made to round up ordown. In other words, there are two scenarios: “0”=“round the GRG legprice down” and “1”=“round the GRG leg price up”.

The Leg Pricer 207 may set up internal data structures in order toevaluate the optimality metric for the rounding scenarios. FIG. 13 showsan example of the tradable combination of FIG. 10 and FIG. 11 withexemplary prices and the roundable legs identified. The order chain ofFIG. 13 represents one of the data structures that will be used inevaluating the optimality metric. As previously mentioned, the Legpricer 207 iterates the chain by starting at the left hand end andcomputing the price data required at each leg. The leg pricer 207 beginswith the anchor price p₁ computes successive leg prices by applying oneof three formulas to determine the price at the next leg. If leg k+1 isnot a roundable leg then p_(k+1)=p_(k)+q_(k). If leg k+1 is a roundableleg the formula depends on the rounding direction in the scenario beingconsidered. If the direction is downwards thenp_(k+1)=floor(p_(k)+q_(k), tick_(k+1)). If the direction is upwards thenp_(k+1)=ceiling(p_(k)+q_(k), tick_(k+1)). These prices are used tocalculate the trader gain (or loss) for each of the roundable spreads.Note that although the final roundable spread in the chain has its legprice fixed on the right hand side, its leg price on the left hand sidewill depend on prior roundings and that the final roundable spread willalso have a trader gain (or loss).

In FIG. 13 there are three roundable legs and therefore eight (i.e. 2³)rounding scenarios. A rounding scenario may be expressed as a sequenceof 1's and 0's where each position in the sequence corresponds to aroundable leg, i.e. a leg where rounding is possible. For example, a “0”may indicate a round down and a “1” may indicate a round up. In otherwords, a rounding scenario is a direction of rounding for a set of oneor more roundable orders. The direction for each order may be up ordown. In this manner the scenarios may be numbered from “000” (rounddown at every roundable leg) to “111” (round up at every roundable leg),since these correspond to decimal numbers 0 and 7. The eight scenariosmay be numbered from zero to seven and these numbers may be used toindex into one or more tables of prices, trader gains and partialcalculations of one or more optimality metrics. An example such a tableis shown in Table 9.

TABLE 9 Scenario Position Index and Rounding Direction Scenario PositionIndex and Rounding Direction 1 2 3 Scenario CLG HUG CLF 000 down downdown 001 down down up 010 down up down 011 down up up 130 up down down101 up down up 110 up up down 111 up up up

An example of iteration and price calculation is shown in Table 10. Ananchor price of $2.0551 per gallon has been used for illustration, whichequates to the $86,314.2 full contract price used in FIG. 13. Theiteration starts with k=1 at the anchor leg and proceeds rightwardsalong the chain. For every leg k+1, the spread trader gain Δ_(k) for thepreceding spread from leg k to k+1 is calculated according to theformula Δ_(k)=(p_(k+1)−p_(k))−q_(k). It is understood that Δ_(k) maytake on positive or negative values and that a negative gain isequivalent to a loss. For example, scenario “000” starts with theleftmost leg at the anchor price and rounds downward at scenarioposition 1 (leg 2), scenario position 2 (leg 3) and scenario position 3(leg 5). Trader D, who is buying the HO:CL spread, experiences a smallnegative gain of −4.2 when the CL selling price is rounded down. TraderE sees neither a gain nor a loss since this scenario fortuitously putboth of his or her leg prices on-tick. Trader A experiences a largenegative gain of −7.4. Trader B, whose roundable spread is the last inthe chain, experiences a large gain of 14.2 because the downwardroundings have accumulated to create a very low buy leg price for traderA's order to sell HOF:CLF (the CLF leg is the buy leg when this contractis sold). Table 10 shows the calculations of Δ_(k) for all eightscenarios as well as the data required for two exemplary optimalitymetrics, namely scenario variance and minimum trader gain. In animplementation, the internal data structures used to evaluate theoptimality metric may comprise all or part of Table 10.

TABLE 10 Scenarios Compared Order 1 2 3 4 5 6 7 var min Position ktrader D trader E trader F trader A trader B trader C in trader Left LegHOG CLG HUG HUF CLF HOF HOG trader gain Contract tick = 4.2 tick = 10tick = 4.2 tick = 4.2 tick = 10 tick = 4.2 redux gain min Δ_(k) SpreadHOG:CLG HUG:CLG HUF:HUG HUF:CLF HOF:CLF HOF:HOG tick = 4.2 sum of priceq_(k) −13,450 13,870 −2,742.6 −12,620 14,730 210 the Step/ tick = 10tick = 10 tick = 4.2 tick = 10 tick = 10 tick = 4.2 squares Scenario ofthe Scenario anchor 1 2 HUF is 3 fixed anchor partial Position $2.0551/on-tick redux gains gallon Δ_(k) 0 p_(k) 86,314.2 72,860 86,730 83,987.471,360 86,126.2 86,314.2 000 Δ_(k) −4.2 0 0 −7.4 14.2 0 274.04 −7.4 1p_(k) SAME 72,860 86,730 83,987.4 71,370 86,126.2 SAME 001 Δ_(k) −4.2 00 2.6 4.2 0 42.04 −4.2 2 p_(k) SAME 72,860 86,730 83,987.4 71,36086,126.2 SAME 010 Δ_(k) −4.2 0 0 −7.4 14.2 0 274.04 −7.4 3 p_(k) SAME72,860 86,730 83,987.4 71,370 86,126.2 SAME 011 Δ_(k) −4.2 0 0 2.6 4.2 042.04 −4.2 4 p_(k) SAME 72,870 86,738.4 83,995.8 71,370 86,126.2 SAME130 Δ_(k) 5.8 −1.6 0 −5.8 4.2 0 87.48 −5.8 5 p_(k) SAME 72,870 86,738.483,995.8 71,380 86,126.2 SAME 101 Δ_(k) 5.8 −1.6 0 4.2 −5.8 0 87.48 −5.86 p_(k) SAME 72,870 86,742.6 84,000 71,380 86,126.2 SAME 110 Δ_(k) 5.82.6 0 0.0 −5.8 0 74.04 −5.8 7 p_(k) SAME 72,870 86,742.6 84,000 71,38086,126.2 SAME 111 Δ_(k) 5.8 2.6 0 0.0 −5.8 0 74.04 −5.8

Leg pricer 207 may determine which of the rounding scenarios is theoptimal rounding scenario, as determined by the minimization ormaximization of a optimality metric. In one embodiment, the optimalitymetric is the sum of the squares of the trader gains, hereinafterreferred to as the scenario variance. The determination of the optimalscenario is determined by calculating the scenario variances for all ofthe scenarios and comparing these variances until the lowest variance isfound. This is considered optimal because squaring the gain causes largegains and losses to be penalized more heavily than small gains andlosses, thereby preferring scenarios with many small gains and lossesdistributed as widely as possible. For example, FIG. 14 shows thescenario variances for the eight scenarios of Table 10 as they may beplotted after calculation. Of these, scenario 1 and scenario 3 have thelowest and identical value of 42.04. Either may be chosen as the fairestscenario and in an implementation the lowest numbered scenario is chosen(“first found and never bettered”). FIG. 15 shows a variety of scenariovariances for anchor prices close to that used in Table 10 and FIG. 13.It can be seen that scenarios towards the middle of the horizontal axisare often the best, since these correspond to a mixture of upward anddownward roundings. However, this is not always the case, and smallchanges in the anchor price can quickly change the lowest variancescenario.

In an alternative implementation, the leg pricer 207 may use the minimumtrader gain as the optimality metric. Table 10 shows the result of thecalculation, which for the prices used in the example will lead to thesame “001” scenario being chosen as the best. Those of skill in the artwill appreciate that a variety of optimality metrics can be defined,including but not limited to functions which prevent gains and losses ofmore than a tick and functions which prevent trader losses entirely. Itis understood that optimality metrics that impose stricter criteria mayrequire the matcher 204 to impose additional constraints on the tradablecombinations that it passes to the leg pricer 207.

The leg pricer 207 may apply a rounding scenario to calculate therounded prices and subsequently convert these prices to external pricesthat can be communicated to the other components of the trading system130. This is accomplished by dividing by the contract size (1000 barrelsin the example) and converting to the appropriate external unit (1barrel=42 gallons). Table 11 shows the trade prices and leg prices forscenario 1 converted back to external units.

TABLE 11 External Prices buy sell sell buy sell buy Order HOG:CLGHUG:CLG HUF:HUG HUF:CLF HOF:CLF HOF:HOG Trade $13.45 $13.87 $−0.0653$12.62 $14.73 $−0.0050 Price Leading $2.0551 $72.86 $2.0650 $1.9997$71.37 $2.0501 Leg Trailing $72.86 $2.0650 $1.9997 $71.37 $2.0501$2.0551 Leg

The leg pricer 207 may compare the calculated leg prices with criteriaestablished for the trading system as a whole and made available to theleg pricer 207 through the core 203 and adaptation Layer 202. Thecriteria may include upper and lower limits for trades in outrightcontracts, possibly subject to price discovery, or requirements thattrades in some outright contracts take place at non-negative values.Those of skill in the art will appreciate that failure to meet suchcriteria may be due to business or technical conditions that require themanagement of the exchange to intervene in the operation of the tradingsystem. It is understood that any pre-programmed response to suchconditions would normally be defined in a part of the system other thanthe leg pricer 207. However, this would not preclude an implementationof the leg pricer 207 from containing some of the required actions, suchas turning off zero-loss leg pricing if the adjusted anchor prices werecausing leg prices to exceed pre-established limits. Depending on theresults of the comparison, the leg pricer 207 may either output theprice data and return an indication of success to the matcher 204 orreturn an indication of failure to the matcher 204.

Leg pricer 207 may communicate the trades to the trading system usingthe adaptation layer 202. Those of skill in the art will appreciate thatcomputer programming languages such as Java or C++ allow theimplementation of design patterns appropriate for assembling a messagefrom multiple locations within a component. An example of such a designpattern is the builder pattern. It is understood that the adaptationlayer 202 may be used to output the required data.

In an alternative embodiment, leg pricer 207 utilizes the minimumscenario variance as the optimality metric but groups the calculationsof squared gains so that redundant calculations are reduced oreliminated. For example, if there are three roundable legs and eightscenarios, calculating the squared gains at every leg in every scenariowould require twenty-four (three times eight) calculations. However, itis clear that every scenario whose first step is an upward rounding willhave the same squared gain at the first leg and that similar reasoningapplies to the other directions and other legs. FIG. 16 illustrates thatthe calculations may be grouped so that only fourteen (two plus fourplus eight) calculations are needed. Table 12 lists the scenarios, eachof which results in a set of roundings and their partial variances, butalso the leg price that precedes the anchor redux at the far end of thechain.

TABLE 12 Scenarios and Node Sequences in the Tree of FIG. 16 Sequence ofScenario Position Index nodes through and Rounding Direction the treeprior 1 2 3 Scenario to node 15 CLG HUG CLF 000 0, 1, 3, 7 down downdown 001 0, 1, 3, 8 down down up 010 0, 1, 4, 9 down up down 011 0, 1,4, 10 down up up 100 0, 2, 5, 11 up down down 101 0, 2, 5, 12 up down up110 0, 2, 6, 13 up up down 111 0, 2, 6, 14 up up up

The leg pricer 207 may represent the tree in a variety of ways. Those ofskill in the art will appreciate that computer programming languagessuch as Java and C++ provide a variety of data types that may be used torepresent trees and that the following description is only anillustration of how the data may be stored. For example, the tree may berepresented as a node-indexed vector S[i] of predecessors, as shown inTable 13. It is understood that the structure of the tree is fixed butthat the properties of its nodes may vary. In other words, thenode-indexed vector of predecessors may be constructed when the legpricer 207 itself is initialized but there may be other node-indexedvectors that hold the properties of the nodes that may change for eachtradable combination.

To compute the values at the nodes for a specific tradable combination,the leg pricer 207 iterates the chain of orders rightwards from theanchor point. As it proceeds, it keeps an index i to represent whichroundable leg it is currently working with. The value i=0 indicates thatno roundable legs have yet been encountered. At each roundable leg, theleg pricer 207 performs the downward rounding first and continues on tothe next node in the corresponding scenario. When there are no morenodes in the tree, it steps back through the predecessors to the firstnode for which no upward rounding has been performed. At that point itperforms the upward rounding and advances through the tree performingdownward roundings until there are no more nodes. The node whose pricegives the best scenario variance when the final step to node 15 isconsidered becomes the predecessor of node 15 and the best scenario isdetermined. Those of skill in art will appreciate that the foregoingprocedure corresponds to the well-known technique of traversing a binarytree “depth-first” and that other traversals may be readily implemented.

TABLE 13 Node Indexed Vector Predecessor Node “S” Table Node PrecedingNode i S[i] 0 0 1 0 2 0 3 1 4 1 5 2 6 2 7 3 8 3 9 4 10 4 11 5 12 5 13 614 6 15 to be determined

As the iteration advances, the leg pricer 207 may record the sums of thesquared gains along each scenario as partial variances. In other words,each node may be assigned a weight equal to the partial variance upuntil that node, which will consist of the sum of the squared gains forall of the roundable spread traders whose orders preceded that node. Itis understood that other optimality metrics may be evaluated in thismanner, including but not limited to the minimum trader gain.

Those of skill in the art will appreciate that a variety of techniquescan be used to avoid performing redundant operations. For example, thenon-roundable spreads do not contribute gains and losses. In addition,it can be seen in Table 10 that the prices at the left leg of eachroundable spread depend only the previous rounding decision, so thatthese prices may be kept in a node indexed vector.

In an alternative embodiment, the leg pricer 207 may use a roundable legthreshold to reduce the number of calculations in the optimal pathalgorithm. The number of rounding scenarios increases exponentially (asa power of 2). For example, a chain with 6 roundable spreads will have 5roundable legs and 32 scenarios to test, a chain with 7 roundablespreads has 64, and so on. The “roundable leg threshold” may set themaximum number of roundable legs that will be used for scenariogeneration. If the number of roundable spreads exceeds the threshold,the leg pricer 207 will use an alternative “rounding of last resort” inplace of optimal search. The threshold is determined by performancetesting at the time of implementation. For example, the threshold may beset to seven (7), i.e. if there are more than 7 roundable spreads, thenthe alternative rounding algorithm will be used. This limits the numberof roundable legs to 6 (one less than the number of spreads) and thenumber of scenarios to 64=2⁶. The roundable leg threshold may be eitherread from a configuration file or stored as a defined constant.

In an alternative embodiment, the leg pricer 207 may be configured tosearch only the parts of the tree most likely to result in the detectionof the optimal scenario. For example, the depth-first search may bebounded so that only two steps beyond the current node are evaluatedbefore retracing and that after the four successors to the current nodehave been evaluated, the current node is advanced to the immediatesuccessor with the lowest partial scenario variance. This is referred toas the “two step branch and bound (2BB) algorithm” and its operation isillustrated in FIG. 17. The partial variances are calculated for nodes1, 2, 3, 4, 5 and 6 in the first step (shown with crosshatching), fromwhich 1 is selected as the successor of 0 in the “most likely to bebest” scenario. In step 2, the partial variances are calculated at nodes7, 8, 9 and 10, from which node 3 is selected as the successor to node1. Finally, the full scenario variances are calculated using the tradergain in the final roundable spread between CLF and HOF for 7 and 8 aspredecessors, since these are the only remaining successors to node 3 inthe binary part of the tree. Of these, node 8, is identified as havingthe best result. The selection of node 8 as the predecessor to node 15identifies scenario 001 as the best scenario. The saving in calculationis significant in larger trees since only four new calculations areperformed for each tier (roundable leg). In a tree with six tiers thisresults in 24 partial variance calculations instead of 126 for the treemethod or 384 for a full table evaluation of all the scenarios.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, or in computer software, firmware, or hardware, including thestructures disclosed in this specification and their structuralequivalents, or in combinations of one or more of them. Embodiments ofthe subject matter described in this specification can be implemented asone or more computer program products, i.e., one or more modules ofcomputer program instructions encoded on a computer readable medium forexecution by, or to control the operation of, data processing apparatus.The computer readable medium can be a machine-readable storage device, amachine-readable storage substrate, a memory device, or a combination ofone or more of them. The term “data processing apparatus” encompassesall apparatus, devices, and machines for processing data, including byway of example a programmable processor, a computer, or multipleprocessors or computers. The apparatus can include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a standalone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this specification can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andanyone or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Moreover, a computer can be embedded inanother device, e.g., a mobile telephone, a personal digital assistant(PDA), a mobile audio player, a Global Positioning System (GPS)receiver, to name just a few. Computer readable media suitable forstoring computer program instructions and data include all forms of nonvolatile memory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., EPROM, EEPROM, and flash memorydevices; magnetic disks, e.g., internal hard disks or removable disks;magneto optical disks; and CD ROM and DVD-ROM disks. The processor andthe memory can be supplemented by, or incorporated in, special purposelogic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a devicehaving a display, e.g., a CRT (cathode ray tube) or LCD (liquid crystaldisplay) monitor, for displaying information to the user and a keyboardand a pointing device, e.g., a mouse or a trackball, by which the usercan provide input to the computer. Other kinds of devices can be used toprovide for interaction with a user as well; for example, feedbackprovided to the user can be any form of sensory feedback, e.g., visualfeedback, auditory feedback, or tactile feedback; and input from theuser can be received in any form, including acoustic, speech, or tactileinput.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back end, middleware, or front end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

FIG. 8 illustrates a method 800 for providing leg prices for a tradablecombination of orders. The method may include the acts shown in FIG. 8.Additional, different or fewer acts may be provided. For example, method800 may not include act 830. The method 800 may be implemented using theleg pricer of FIG. 2 or a different device or system. As shown in FIG.8, the method 800 may include receiving a tradable combination from thematcher 810; initialization 820; determining the optimal roundingscenario 830; rounding the external prices 840: comparing the prices tocriteria 850; and, depending on the results of the comparison, eitheroutputting data 860 and returning an indication of success 870 orreturning an indication of failure 880.

In act 810, a leg pricer may receive a tradable combination. In oneembodiment, the tradable combination is received as a data structurecorresponding to nodes and edges. The tradable combination may be, asdiscussed above, a category one combination, a category two combination,a category three combination, a category four combination, a categoryfive combination, or a category six combination, it being understoodthat category six includes categories one through five as subcategories.In act 820, the leg pricer may perform initialization.

FIG. 9 illustrates one embodiment of a method 900 for performinginitialization. As shown in FIG. 9, initialization may includeidentifying an anchor leg 920; determining an anchor price 930;repositioning the order chain for iteration 940; determining the numberof rounding scenarios to be considered 950; and setting, if necessary,the initial values in the data structures that will be used forevaluating the scenarios.

In act 920, a leg pricer may identify an anchor leg. If the tradablecombination contains outrights then the anchor leg is the virtualoutright. If the tradable combination does not contain outrights thenthe anchor leg is the leg in which the most recent trade with pricediscovery has occurred.

In act 930, the leg pricer may determine the anchor price at the anchorleg. If the tradable combination contains outrights then the anchorprice at the virtual outright anchor leg is zero. If the tradablecombination does not contain outrights then the anchor price isdetermined by first determining a raw anchor price and seconddetermining an anchor price based on the raw anchor price, one or moreproperties of the tradable combination received from the Matcher and oneor more properties of the contracts being bought or sold by the ordersin the tradable combination. The raw anchor price is the price of themost recent trade in the anchor leg. If the tradable combinationconsists of a buy order and a sell order in a roundable spread contractthat has been designated as a contract for zero-loss leg pricing thenthe anchor price may be adjusted from the raw anchor price to a nearbyprice in such a way that the leg prices will be on-tick, using theprocedure previously described for a category four combination. It isunderstood that the raw anchor price may on occasion satisfy thecriteria for zero-loss leg pricing and the “nearby price” may be the rawanchor price itself. If the tradable combination is not subject tozero-loss leg pricing then the anchor price may be set to the raw anchorprice. It is understood that in act 850 the calculated leg prices may becompared to criteria established by the exchange, including but notlimited to upper and lower price limits for outright trades. It isfurther understood that some failures to meet said criteria can inprinciple be corrected by a small adjustment of the anchor price thatwould be acceptable to the participating traders, for example where theleg price in a combination consisting entirely of spreads has exceededan upper price limit by a small amount. Those of skill in the art willappreciate that act 930 can be readily extended to include furtheradjustments of the anchor price following the computation of leg prices.

In act 940, the leg pricer may convert the circuit form of the tradablecombination into a chain with its origin at the anchor leg. Convertingthe circuit form may include using iterators, pointers, indexes,counters or similar forms of indirect reference rather than explicitly“splitting”, “rotating”, “copying” or otherwise operating directly onthe data structure received in act 810. In act 950, the leg pricer mayiterate the chain resulting from act 940 and determine the number ofrounding scenarios that are to be considered. For example, category onecombinations, category two combinations, category three combinations,and category four combinations include single rounding scenarios. In act960 the Leg Pricer 207 sets up the internal data structures needed toevaluate the optimality metric for the rounding scenarios so that theoptimal scenario can be determined.

In act 970 the initialization for the determination of the optimalrounding scenario has been completed. This is the final component act inact 820 of method 800.

Returning now to FIG. 8, in act 830, the leg pricer may identify therounding scenario, which was identified in act 820, is the optimalrounding scenario as determined by the minimization or maximization of aoptimality metric. In one embodiment, the optimality metric is the sumof the squares of the trader gains, hereinafter referred to as thescenario variance. The determination of the fairest scenario isdetermined by calculating the scenario variances for all of thescenarios and comparing these variances until the lowest variance isfound. This is considered optimal because squaring the gain causes largegains and losses to be penalized more heavily than small gains andlosses, thereby preferring scenarios with many small gains and lossesdistributed as widely as possible. In an alternative embodiment of act830, the minimum trader gain is used as the optimality metric. In act840, the optimal scenario, determined in act 830, is applied to theexternal prices.

In act 850, the calculated leg prices are compared with criteriaestablished by the exchange for the trading system as a whole and madeavailable to the leg pricer. The criteria may include upper and lowerlimits for trades in outright contracts, possibly subject to pricediscovery, or requirements that trade in some outright contracts takeplace at non-negative values. Those of skill in the art will appreciatethat failure to meet such criteria may be due to business or technicalconditions that require the management of the exchange to intervene inthe operation of the trading system. It is understood that anypre-programmed response to such conditions would normally be defined ina part of the system other than the leg pricer. However, this would notpreclude an implementation of the leg pricer from containing some of therequired actions, such as turning off zero-loss leg pricing if theadjusted anchor prices were causing leg prices to exceed pre-establishedlimits. Depending on the results of the comparison, the leg pricer mayeither return an indication of failure in act 880 or continue to act 860and act 870.

In act 860, the leg pricer may communicate the trades to the tradingsystem by means of the adaptation layer 202. Those of skill in the artwill appreciate that computer programming languages such as Java or C++allow the implementation of design patterns appropriate for assembling amessage from multiple locations within a component. An example of such adesign pattern is the builder pattern. It is understood that theadaptation layer 202 may be used to output the required data.

In act 870, the leg pricer may return a Boolean variable (i.e. true orfalse) to the matcher in order to indicate whether it has completed itscalculations successfully and output the required data. In analternative embodiment of acts 960 and 830, the leg pricer may utilizethe minimum scenario variance as the optimality metric but group thecalculations of squared gains so that redundant calculations are reducedor eliminated. For example, if there are three roundable legs and eightscenarios, calculating the squared gains at every leg in every scenariowould require twenty-four (three times eight) calculations. However, itis clear that every scenario whose first step is an upward rounding willhave the same squared gain at the first leg and that similar reasoningapplies to the other directions and other legs.

In an alternative embodiment of acts 960 and 830, the leg pricer may beconfigured to search only the parts of the tree most likely to result inthe detection of the optimal scenario. For example, the depth-firstsearch may be bounded so that only two steps beyond the current node areevaluated before retracing and that after the four successors to thecurrent node have been evaluated, the current node is advanced to theimmediate successor with the lowest partial scenario variance. This isreferred to as the “two step branch and bound (2BB) algorithm”.

While this specification contains many specifics, these should not beconstrued as limitations on the scope of the invention or of what may beclaimed, but rather as descriptions of features specific to particularembodiments of the invention. Certain features that are described inthis specification in the context of separate embodiments can also beimplemented in combination in a single embodiment. Conversely, variousfeatures that are described in the context of a single embodiment canalso be implemented in multiple embodiments separately or in anysuitable subcombination. Moreover, although features may be describedabove as acting in certain combinations and even initially claimed assuch, one or more features from a claimed combination can in some casesbe excised from the combination, and the claimed combination may bedirected to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the embodiments described above should not be understoodas requiring such separation in all embodiments, and it should beunderstood that the described program components and systems cangenerally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular embodiments of the invention have been described. Otherembodiments are within the scope of the following claims. For example,the actions recited in the claims can be performed in a different orderand still achieve desirable results.

1. A leg pricer comprising: an input operable to receive a tradablecombination of orders among which there are two or more roundable spreadorders, each comprising at least two or more leg orders wherein one ofthe at least two or more leg orders of at least one of the two or moreroundable spread orders is characterized by a minimum price incrementdifferent from a minimum price increment of another of the at least twoor more leg orders; and a processor coupled with the input, theprocessor being operable to calculate leg prices for each of the atleast two or more leg orders of each of the two or more roundable spreadorders in the tradable combination such that the leg prices aremultiples of the minimum price increment of one of the at least two ormore leg orders of the associated roundable spread order and that thegains and losses of the two or more roundable spread orders areoptimally distributed to fairly distribute any gains or losses amongeach trader associated with the two or more roundable spread ordersresulting from the leg price calculations by at least one of:minimization of a sum of squares of differences between leg prices;minimization of a loss experienced by a trader, such loss beingcalculated using differences between leg prices; or determination of ananchor leg and an anchor price from which other leg prices arecalculated by addition and subtraction of the prices of the other ordersin the tradable combination; and wherein the processor is furtheroperative to calculate the leg prices for each of the at least two ormore leg orders of each of the two or more roundable spread orders inthe tradable combination according to an optimal rounding scenario whichincludes at least one of: generation of a tree that represents one ormore rounding scenarios to be compared, the tree including a vertex foreach of the rounding scenarios to be compared; identification of therounding scenario with the smallest total variance and determining, bythe processor, that the identified rounding scenario is the optimalrounding scenario; or determination of a weight vector for each vertexassociated with the rounding scenario; and further wherein the legpricer further comprises: an output coupled with the processor, theprocessor being operable to provide the output with the calculated legprices.
 2. The leg pricer of claim 1, wherein, when the optimaldistribution includes determining an anchor leg and an anchor price fromwhich the other leg prices are calculated by adding and subtracting theprices of the other orders in the tradable combination, the anchor legand anchor price are determined as a function of recorded times andprices of trades in outright contracts.
 3. The leg pricer of claim 2,wherein the processor is operable to use an initial price and timepriority for each outright contract to determine the anchor leg andanchor price for tradable combinations in which not every leg has arecorded trade in an associated outright contract.
 4. The leg pricer ofclaim 1, wherein leg prices are calculated by simple addition andsubtraction of spread prices relative to an anchor price and thecorresponding reported leg prices that are constrained to be multiplesof the minimum price increments defined for each leg.
 5. A leg pricercomprising: an input operable to receive one or more roundable spreadorders, each roundable spread order having one or more roundablelegorders, each characterized by a roundable tick price having a minimumprice increment different from at least one other of the one or moreroundable leg orders of the one or more roundable spread orders; aprocessor operable to round the roundable tick prices of the one or moreroundable legorders of each of the one or more roundable spread ordersand minimize fractional gains and losses by distribution of thefractional gains and losses among each trader associated with the one ormore roundable spread orders; wherein the processor is further operativeto round the roundable tick prices for each of the at least one or moreroundable leg orders of each of the one or more roundable spread ordersaccording to an optimal rounding scenario which includes at least oneof: generation of a tree that represents one or more rounding scenariosto be compared, the tree including a vertex for each of the roundingscenarios to be compared; identification of the rounding scenario withthe smallest total variance and determining, by the processor, that theidentified rounding scenario is the optimal rounding scenario; ordetermination of a weight vector for each vertex associated with therounding scenario; and further wherein the leg pricer further comprises:an output that is operable to output the rounded tick prices as marketdata.
 6. The leg pricer of claim 5, wherein the processor is operable toround tick prices using an optimal rounding scenario, the optimalrounding scenario being determined using graph theory.
 7. The leg pricerof claim 5, wherein the processor is operable to reposition an impliedchain having a matching input order.
 8. The leg pricer of claim 6,wherein the processor is operable to identify the one or more roundablespread orders in the implied chain.
 9. The leg pricer of claim 6,wherein the processor is operable to identify one or more roundingscenarios based on the roundable spread orders.
 10. The leg pricer ofclaim 6, wherein the processor is operable to determine a total variancefor each of the rounding scenarios.
 11. The leg pricer of claim 6,wherein the processor is operable to identify the optimal roundingscenario by comparing the total variance for each of the roundingscenarios.
 12. The leg pricer of claim 5, wherein the processor isoperable to calculate a weight vector for each roundable spread order.13. A computer implemented method of rounding tick prices, the methodcomprising: identifying, by a processor, one or more roundable spreadorders in an implied chain having a matching order, each of the one ormore roundable spread orders comprising at least two leg orders eachhaving a leg price associated therewith, at least one of the one or moreroundable spread orders comprising at least two or more leg orderswherein one of the at least two or more leg orders is characterized by aminimum price increment different from a minimum price increment ofanther of the at least two or more leg orders; determining, by theprocessor, an optimal rounding scenario for rounding the leg prices ofthe at least two leg orders of the identified one or more roundablespread orders, the optimal rounding scenario ensuring that the legprices of the identified one or more roundable spread orders are on-tickand that the fractional gains and losses to each trader associated withthe one or more roundable spread orders are minimized; and whereindetermining the optimal rounding scenario includes at least one of:determining, by the processor, the number of possible rounding scenariosbased on the number of roundable spread orders identified; generating,by the processor, a tree that represents one or more rounding scenariosto be compared, the tree including a vertex for each of the roundingscenarios to be compared; identifying, by the processor, the roundingscenario with the smallest total variance and determining, by theprocessor, that the identified rounding scenario is the optimal roundingscenario; or determining, by the processor, a weight vector for eachvertex associated with the rounding scenario; and rounding, by theprocessor, the leg prices of the roundable spread orders using theoptimal rounding scenario.
 14. The computer implemented method asclaimed in claim 13, wherein determining the optimal rounding scenarioby generating a tree that represents one or more rounding scenarios tobe compared, the tree including a vertex for each of the roundingscenarios to be compared further includes determining a partial varianceone or more vertices in the tree.
 15. The computer implemented method asclaimed in claim 14, wherein determining the optimal rounding scenarioincludes determining a total variance for one or more roundingscenarios.
 16. The computer implemented method as claimed in claim 15,wherein the total variance of a rounding scenario is a summation of thepartial variances of each vertex associated with that rounding scenario.17. The computer implemented method as claimed in claim 13, whereinrounding the leg prices includes rounding prices using an optimalrounding scenario, the optimal rounding scenario being determined usinggraph theory.
 18. An apparatus for pricing legs of tradable spreads, theapparatus including: a means for identifying one or more roundablespread orders in an implied chain having a matching order, each of theone or more roundable spread orders comprising at least two leg orderseach having a leg price associated therewith, at least one of the one ormore roundable spread orders comprising at least two or more leg orderswherein one of the at least two or more leg orders is characterized by aminimum price increment different from a minimum price increment ofanther of the at least two or more leg orders; a means for determining aoptimal rounding scenario for rounding the leg prices of the at leasttwo leg orders of the identified one or more roundable spread orders,the optimal rounding scenario ensuring that the leg prices of theidentified one or more roundable spread orders are on-tick and that thefractional gains and losses to each traderassociated with the one ormore roundable spread orders are minimized; and wherein the optimalrounding scenario includes a determination of the possible roundingscenarios based on the number of roundable spread orders identified andan optimality metric and at least one of: generation of a tree thatrepresents one or more rounding scenarios to be compared, the treeincluding a vertex for each of the rounding scenarios to be compared;identification of the rounding scenario with the smallest total varianceand determination that the identified rounding scenario is the optimalrounding scenario; or determination of a weight vector for each vertexassociated with the rounding scenario; and a means for rounding the legprices of the roundable spread orders using the optimal roundingscenario.
 19. A computer implemented method of rounding tick prices, themethod comprising: identifying, by a processor, one or more roundablespread orders in an implied chain having a matching order, each of theone or more roundable spread orders comprising at least two leg orderseach having a leg price associated therewith, at least one of the one ormore roundable spread orders comprising at least two or more leg orderswherein one of the at least two or more leg orders is characterized by aminimum price increment different from a minimum price increment ofanther of the at least two or more leg orders; determining, by theprocessor, an optimal rounding scenario for rounding the leg prices ofthe at least two leg orders of the identified one or more roundablespread orders, the optimal rounding scenario ensuring that the legprices of the identified one or more roundable spread orders are on-tickand that the fractional gains and losses to each trader associated withthe one or more roundable spread orders are minimized; and whereindetermining the optimal rounding scenario includes generating, by theprocessor, a tree that represents one or more rounding scenarios to becompared, the tree including a vertex for each of the rounding scenariosto be compared; and rounding, by the processor, the leg prices of theroundable spread orders using the optimal rounding scenario.
 20. Acomputer implemented method of rounding tick prices, the methodcomprising: identifying, by a processor, one or more roundable spreadorders in an implied chain having a matching order, each of the one ormore roundable spread orders comprising at least two leg orders eachhaving a leg price associated therewith, at least one of the one or moreroundable spread orders comprising at least two or more leg orderswherein one of the at least two or more leg orders is characterized by aminimum price increment different from a minimum price increment ofanther of the at least two or more leg orders; determining, by theprocessor, an optimal rounding scenario for rounding the leg prices ofthe at least two leg orders of the identified one or more roundablespread orders, the optimal rounding scenario ensuring that the legprices of the identified one or more roundable spread orders are on-tickand that the fractional gains and losses to each trader associated withthe one or more roundable spread orders are minimized; and whereindetermining the optimal rounding scenario includes identifying, by theprocessor, the rounding scenario with the smallest total variance anddetermining, by the processor, that the identified rounding scenario isthe optimal rounding scenario; and rounding, by the processor, the legprices of the roundable spread orders using the optimal roundingscenario.
 21. A computer implemented method of rounding tick prices, themethod comprising: identifying, by a processor, one or more roundablespread orders in an implied chain having a matching order, each of theone or more roundable spread orders comprising at least two leg orderseach having a leg price associated therewith, at least one of the one ormore roundable spread orders comprising at least two or more leg orderswherein one of the at least two or more leg orders is characterized by aminimum price increment different from a minimum price increment ofanther of the at least two or more leg orders; determining, by theprocessor, an optimal rounding scenario for rounding the leg prices ofthe at least two leg orders of the identified one or more roundablespread orders, the optimal rounding scenario ensuring that the legprices of the identified one or more roundable spread orders are on-tickand that the fractional gains and losses to each trader associated withthe one or more roundable spread orders are minimized; and whereindetermining the optimal rounding scenario includes determining, by theprocessor, a weight vector for each vertex associated with the roundingscenario; and rounding, by the processor, the leg prices of theroundable spread orders using the optimal rounding scenario.